export default [
  {
    path: 'farm',
    name: 'System-Farm',
    hidden: false,
    code: '7102|7103|7104',
    meta: { title: '农场管理', icon: 'officeBuilding', keepAlive: true },
    redirect: '/system/farm/list',
    children: [
      {
        path: 'list',
        name: 'System-Farm-List',
        hidden: false,
        code: '7102|7103|7104',
        meta: { title: '农场列表', icon: 'List', keepAlive: true },
        component: () => import('@/view/system/farm/index.vue'),
      },
      {
        path: 'add',
        name: 'System-Farm-Add',
        hidden: true,
        meta: { title: '新增农场', icon: 'officeBuilding', keepAlive: true },
        component: () => import('@/view/system/farm/add.vue'),
        beforeEnter: (to, from, next) => {
          if (to.query.id) {
            to.meta.title = '编辑农场'
          }
          next()
        }
      }
    ]
  },
  {
    path: 'team',
    name: 'System-Team',
    hidden: false,
    code: '7202|7203|7204',
    meta: { title: '团队管理', icon: 'Guide', keepAlive: true },
    // component: () => import('@/view/system/team/index.vue'),
    children: [
      {
        path: 'list',
        name: 'System-Team-List',
        hidden: false,
        code: '7202|7203|7204',
        meta: { title: '团队列表', icon: 'List', keepAlive: true },
        component: () => import('@/view/system/team/index.vue'),
      },
      // {
      //   path: 'add',
      //   name: 'System-Team-Add',
      //   hidden:true,
      //   meta: {title: '新增团队',icon: 'officeBuilding', keepAlive: true},
      //   component: () => import('@/view/system/team/add.vue'),
      // }
    ]
  },
  {
    path: 'account',
    name: 'System-Account',
    hidden: false,
    code: '7302|7303|7304',
    meta: { title: '账户管理', icon: 'User', keepAlive: true },
    // component: () => import('@/view/system/account/index.vue'),
    children: [
      {
        path: 'list',
        name: 'System-Account-List',
        hidden: false,
        code: '7302|7303|7304',
        meta: { title: '账户列表', icon: 'List', keepAlive: true },
        component: () => import('@/view/system/account/index.vue'),
      },
      // {
      //   path: 'add',
      //   name: 'System-Account-Add',
      //   hidden:true,
      //   meta: {title: '新增账户',icon: 'officeBuilding', keepAlive: true},
      //   component: () => import('@/view/system/account/add.vue'),
      // }
    ]
  },
  {
    path: 'role',
    name: 'System-Role',
    hidden: false,
    code: '7602|7603|7604|7605',
    // onlyShows:[1], // 仅在角色id为1的时候显示（即平台管理人员）
    meta: { title: '角色管理', icon: 'Lock', keepAlive: true },
    // component: () => import('@/view/system/role/index.vue'),
    children: [
      {
        path: 'list',
        name: 'System-Role-List',
        hidden: false,
        code: '7602|7603|7604|7605',
        meta: { title: '角色列表', icon: 'List', keepAlive: true },
        component: () => import('@/view/system/role/index.vue'),
      },
      // {
      //   path: 'add',
      //   name: 'System-Role-Add',
      //   hidden:true,
      //   meta: {title: '新增角色',icon: 'officeBuilding', keepAlive: true},
      //   component: () => import('@/view/system/role/add.vue'),
      // }
    ]
  },
  {
    path: 'message',
    name: 'System-Message',
    hidden: false,
    code: '7402|7403|7404|7405|7406|7407',
    // onlyShows:[1], // 仅在角色id为1的时候显示（即平台管理人员）
    meta: { title: '消息管理', icon: 'Bell', keepAlive: true },
    children: [
      {
        path: 'list',
        name: 'System-Message-List',
        hidden: false,
        code: '7402|7403|7404|7405|7406|7407',
        meta: { title: '消息列表', icon: 'List', keepAlive: true },
        component: () => import('@/view/system/message/index.vue'),
      },
      {
        path: 'add',
        name: 'System-Message-Add',
        hidden: true,
        meta: { title: '新增消息', icon: 'Bell', keepAlive: true },
        component: () => import('@/view/system/message/add.vue'),
        beforeEnter: (to, from, next) => {
          if (to.query.id) {
            to.meta.title = '编辑消息'
          }
          next()
        }
      },
      {
        path: 'details',
        name: 'System-Message-Details',
        hidden: true,
        meta: { title: '消息详情', icon: 'Bell', keepAlive: true },
        component: () => import('@/view/system/message/details.vue'),
      }
    ]
  },
  {
    path: 'opinion',
    name: 'System-Opinion',
    hidden: false,
    code: '7502|7503',
    // onlyShows:[1], // 仅在角色id为1的时候显示（即平台管理人员）
    meta: { title: '意见反馈', icon: 'QuestionFilled', keepAlive: true },
    children: [
      {
        path: 'list',
        name: 'System-Opinion-List',
        hidden: false,
        code: '7502|7503',
        meta: { title: '问题与建议', icon: 'List', keepAlive: true },
        component: () => import('@/view/system/opinion/index.vue'),
      },
      {
        path: 'detail',
        name: 'System-Opinion-Detail',
        hidden: true,
        meta: { title: '意见反馈详情', icon: 'officeBuilding', keepAlive: true },
        component: () => import('@/view/system/opinion/detail.vue'),
      }
    ]
  }
]
